import * as sdk from './fetch';

import isMock from './mock-util';
const controllerName = 'CustomerGiftController';

/**
 *
 * 查询礼包列表
 *
 */
async function giftinfoList(request: IPageRequestReq): Promise<BaseResponseCustomerPointsExpireResponse> {
  let result = await sdk.post<BaseResponseCustomerPointsExpireResponse>(
    'giftinfo/list',

    {
      ...request,
    },
  );
  return result.context;
}

/**
 *
 * 领取礼包
 *
 */
async function giftrecordinfoAdd(request: IPageRequestReq): Promise<BaseResponseCustomerPointsExpireResponse> {
  let result = await sdk.post<BaseResponseCustomerPointsExpireResponse>(
    'giftrecordinfo/add',

    {
      ...request,
    },
  );
  return result;
}




export default {

  giftinfoList,

  giftrecordinfoAdd,

};

/**
 * This interface was referenced by `IgnoreType`'s JSON-Schema
 * via the `definition` "IPageRequestReq".
 */
export interface IPageRequestReq {
  giftType?: number;
  giftId?: number;
}


/**
 * This interface was referenced by `IgnoreType`'s JSON-Schema
 * via the `definition` "BaseResponse«CustomerPointsExpireResponse»".
 */
export interface BaseResponseCustomerPointsExpireResponse {
  /**
   * 结果码
   */
  code: string;
  context?: CustomerPointsExpireResponse;
  /**
   * 错误内容
   */
  errorData?: {
    [k: string]: any;
  };
  /**
   * 消息内容
   */
  message?: string;
  [k: string]: any;
}
/**
 * 内容
 */
export interface CustomerPointsExpireResponse {

  [k: string]: any;
}

//create by moon https://github.com/creasy2010/moon
